#ifndef DISHESMANAGEMENT_H
#define DISHESMANAGEMENT_H

#include "itemform.h"
#include <QWidget>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QMessageBox>
#include <QDebug>
#include <QSqlError>
#include <QInputDialog>
#include <QListWidgetItem>
#include <QListWidget>
#include <QKeyEvent>

namespace Ui {
class dishesManagement;
}

class dishesManagement : public QWidget
{
    Q_OBJECT

public:
    explicit dishesManagement(QWidget *parent = nullptr);
    ~dishesManagement();

private slots:
    void on_addBtn_clicked();

    void on_saveBtn_clicked();

    void on_deleteBtn_clicked();

    void on_searchBtn_clicked();

    void on_dishesList_itemClicked(QListWidgetItem *item);

private:
    Ui::dishesManagement *ui;
    QSqlDatabase db;
    void editTrue();
    void editFalse();
    void initList();
    void clearEdit();
};

#endif // DISHESMANAGEMENT_H
